<?php
/**
 * Created by PhpStorm.
 * User: MRPHAN
 * Date: 9/27/2014
 * Time: 11:23 PM
 */
namespace Library\Helper;
use Phalcon\Mvc\User\Component;
use Common\Models\Videos\VideoCategory;


class Helper extends Component
{
    /*
     * Create Menu Category
     */
    public function getMenu($parent_id)
    {
        $menu =  VideoCategory::find('parent_id ='.intval($parent_id));
        if(count($menu) > 0){
            return $menu;
        }

    }

    /*
     * Show gender
     */
    public function getGender($gender){
        $msg = '';
        switch($gender){
            case 0:
                $msg = 'Khác';
                break;
            case 1:
                $msg = 'Nữ';
                break;
            case 2:
                $msg = 'Nam';
                break;
        }
        return $msg;
    }
    /*
     * show type of artist
     */
    public  function getTypeOfArtist($type){
        $msg = '';
        switch($type){
            case 1:
                $msg = 'Diễn Viên';
                break;
            case 2:
                $msg = 'Đạo Diễn';
                break;
        }
        return $msg;
    }
}